ci(release-please): bump uv.lock version via extra-files jsonpath#1518
ci(release-please): bump uv.lock version via extra-files jsonpath#1518
Conversation
release-please bumps `pyproject.toml` but doesn't touch `uv.lock` by default, leaving the project's `[[package]] name = "descope"` entry stale and breaking `uv sync --locked` on every CI job for the release PR (e.g. #1446). Per googleapis/release-please#2561 (and the working incantation in googleapis/release-please#2455 (comment 2643132770)), release-please *can* update array-of-tables TOML entries via an extra-files jsonpath filter — with the catch that the filter side needs `.value` (because the parser wraps strings as `{value, start, end}`) but the update target does not. The pattern is: $.package[?(@.name.value=='descope')].version Add it to release-please-config.json so the lockfile's project version is bumped in lockstep with pyproject.toml. No workflow changes needed.
|
🐕 Review complete — View session on Shuni Portal 🐾 |
There was a problem hiding this comment.
🐕 Shuni's Review
Adds a release-please extra-files jsonpath entry so uv.lock's descope package version gets bumped alongside pyproject.toml.
No issues found — good bones!
Verified: JSON parses, exactly one name = "descope" entry exists in uv.lock (line 525), the .value filter quirk matches the documented release-please TOML parser behavior, and the version matches pyproject.toml. Clean, minimal config change. Woof!
There was a problem hiding this comment.
Pull request overview
Updates the Release Please configuration so that version bumps applied to pyproject.toml are also applied to the project’s own [[package]] entry inside uv.lock, preventing uv sync --locked failures on release PRs.
Changes:
- Add a second
extra-filesTOML updater entry to updateuv.lock’s[[package]] name = "descope"version via a JSONPath filter.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Coverage reportThe coverage rate went from None of the new lines are part of the tested code. Therefore, there is no coverage data about them. |
Summary
Replaces #1515 with a much simpler fix: just one extra entry in
release-please-config.jsoninstead of an entire follow-up workflow job + GitHub App token + push-back-to-PR-branch dance.Background
release-pleasebumpsversioninpyproject.tomlbut doesn't updateuv.lock. The project's own version lives inuv.locktoo:So
uv sync --lockedfails on every CI job for the release PR (#1446) withThe lockfile at uv.lock needs to be updated.Fix
Per googleapis/release-please#2561 and the working incantation documented in #2455 (comment),
release-please's TOML updater can target array-of-tables entries via a jsonpath filter — with one quirk:.valuebecause release-please's TOML parser wraps strings as{value, start, end}objects.valuebecause the updater writes to the field directlyResulting jsonpath:
Why this approach over #1515
.github/workflows/release-please.yml(+55 lines)release-please-config.json(+5 lines)uv lockafter release-please, push commit backcontents: writeClosing #1515 in favor of this.
Verification
[[package]]entry (descope's at line 523-526 ofuv.lock).uv.lockon the next release-please run after merge.